package com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.mapper;

import com.sunwayworld.framework.mybatis.mapper.MapperParameter;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.support.base.mapper.GenericMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@GikamBean
public interface LimsQualitycontrolTestResultMapper extends GenericMapper<Long> {

    List<Map<String, Object>> selectDistinctRows(MapperParameter parameter);

    double selectAverageForHistory(@Param(value = "mainBatchCode") String mainBatchCode,
                                   @Param(value = "controlMaterialLevel") String controlMaterialLevel,
                                   @Param(value = "productName") String productName);

    double selectSDForHistory(@Param(value = "mainBatchCode") String mainBatchCode,
                              @Param(value = "controlMaterialLevel") String controlMaterialLevel,
                              @Param(value = "productName") String productName);
}
